﻿package 
{
    import com.lang.client_resources.panel_loading.*;
    import flash.display.*;
    import flash.text.*;

    public class PanelLoading extends MovieClip implements IPanelLoading
    {
        public var _LoadingText:TextField;
        public var _LoadingProgressBar:MovieClip;
        public var _LoadingProgress:TextField;

        public function PanelLoading()
        {
            return;
        }// end function

        public function get content() : MovieClip
        {
            return this;
        }// end function

        public function setLoadingProgress(param1:int, param2:int = 1, param3:int = 1) : void
        {
            if (param1 > 100)
            {
                param1 = 100;
            }
            this._LoadingProgress.text = param1.toString() + "%" + (param3 > 1 ? ("(" + param2 + "/" + param3 + ")") : (""));
            this._LoadingProgressBar._LoadingCenter.width = 208 * (param1 / 100);
            this._LoadingProgressBar._LoadingRight.x = this._LoadingProgressBar._LoadingCenter.x + this._LoadingProgressBar._LoadingCenter.width;
            return;
        }// end function

        public function setLoadingText(param1:String) : void
        {
            this._LoadingText.text = param1;
            return;
        }// end function

        public function init() : void
        {
            var _loc_1:* = PanelLoadingLang.LoadInfo;
            var _loc_2:uint = 0;
            this.setLoadingProgress(_loc_2);
            this.setLoadingText(_loc_1);
            return;
        }// end function

    }
}
